1. Field of the Invention
The present invention relates to storing data into a storage device of a disk array subsystem and the like and, especially, to a duplicate data storing system, a duplicate data storing method, and a duplicate data storing program, which enable to improve an effective usage of the storage device capacity in a duplicate data storage area at the time of using snapshot technique while maintaining the disk-access performance.
2. Description of the Related Art
When backing up the volume which constitutes a duplicate data storage area in a storage device of a disk array subsystem and the like, the volume as a backup target is duplicated inside the disk array subsystem and a backup server stores data read out from the duplicate data storage area to be the duplicate volume to a backup medium such as a tape drive.
As the method for duplicating the volume, conventionally used is a method in which a complete duplicate of the backup target volume is formed. Naturally, in this case, it takes time which is proportional to the storage capacity of the volume of the backup target for completing the duplication of the volume.
For increasing the use efficiency of the backup-target volume, Japanese Patent Unexamined Publication No. 2001-318833 discloses a technique in which a plurality of volumes are used around so as to select a duplicate volume appropriate for the capacity of the backup-target volume. This technique does not enable to shorten the time used for duplicating the volume. Also, it is necessary to reserve a plurality of the duplicate volumes for functioning as the duplicate data storage areas in advance to be used for backup, which causes such a shortcoming that the required storage capacity becomes redundant.
Recently, in accordance with a remarkably increasing trend of reduction in backup window (system suspension time for backup processing), a technique such as snapshot or shadow copy has been put in use for duplicating the volume.
The snapshot herein is a technique for maintaining the state of the volume as the snapshot-target volume at the time when being designated. For example, if a snapshot of the snapshot-target volume as shown in FIG. 1(a) in which data is stored is taken, first, a snapshot duplicate volume having a storage capacity equivalent to that of the snapshot-target volume is generated in a storage device in the manner as shown in FIG. 1(a).
At a stage of writing data “EE” to a storage area of data “BB” of the snapshot-target volume, the data “BB” before update is stored in the same address of the snapshot duplicate volume in the manner as shown in FIG. 1(b), and the snapshot duplicate volume functions as a first-generation snapshot.
At this time, if another snapshot of the snapshot-target volume is taken once again, a snapshot duplicate volume having the storage capacity equivalent to that of the snapshot-target volume is newly generated in the storage device in the manner as shown in FIG. 1(b), and the snapshot duplicate volume functions as a second-generation snapshot.
Further, if it is desired to write data “FF” in a storage area of data “CC” of the snapshot-target volume, the data “CC” before update is stored in the same address of the snapshot duplicate volume which functions as a second-generation snapshot in the manner as shown in FIG. 1(c), while the content of the snapshot duplicate volume which functions as the first-generation snapshot is being held as shown in FIG. 1(b) or FIG. 1(c).
Here, a series-type snapshot has been briefly described by referring to FIG. 1(a) to FIG. 1(c). In the case where a parallel-type snapshot is applied, when writing the data “FF” in the storage area of the data “CC” of the snapshot-target volume in the manner as shown in FIG. 1(c), the data “CC” is stored also in the first-generation snapshot in addition to the second-generation snapshot.
In the volume duplicating method utilizing the snapshot technique, it may simply define the volume for holding only the update data to the backup-target volume right after the disk array subsystem receives a snapshot command. Thus, the backup-target volume can be seemingly duplicated at instant. Hereinafter, in the backup of the volume using the snapshot technique, the volume for storing an original data as the backup target is referred to as the snapshot-target volume, and the volume to be the duplicate data storage area for holding the update data of the backup-target volume is referred to as the snapshot duplicate volume, respectively.
The use of the snapshot technique in the backup processing is only an example, and the snapshot technique is utilized in other various situations in the operation of the disk array subsystem.
An example of a conventional data storing system for the snapshot duplicate volume using the snapshot technique will be specifically described by referring to FIG. 2 to FIG. 9.
A conventional disk array subsystem 100 comprises: a device (logical-volume property managing table, 201 in FIG. 3) for judging by each logical-volume whether the logical-volume is the snapshot-target volume, the snapshot duplicate volume, or a volume of any other property; a device (logical-volume conversion table, 202 in FIG. 3) for address-converting a read-command or write-command which is issued by a host by designating the logical-volume into another logical-volume as the inner operation; and a device (held-data managing table, 203 in FIG. 3) for judging whether or not the snapshot duplicate volume holds the data required by the read-command or the write-command.
The data held in the snapshot duplicate volume is managed in a size peculiar to the disk array subsystem 100, so that the read-command or the write-command from the host is divided into the peculiar management units described above by an IO monitoring device (400 in FIG. 7) to be processed by each management unit.
FIG. 4, FIG. 5, and FIG. 6 illustrate the process of forming the duplicate of the volume and performing reading or writing from/to the volume in the disk array subsystem 100 employing the above-described data storing system.
As the process for duplicating the volume, first, as shown in FIG. 4, the snapshot-target volume and the snapshot duplicate volume having at least the same storage capacity as that of the snapshot-target volume are formed within the disk array subsystem in a step 3a00.
FIG. 2 shows the state of this process. In this example, two logical-volumes, that is, a logical-volume LV0 and a logical-volume LV1 are formed in the disk array subsystem 100.
When the disk array subsystem receives a snapshot command having a parameter which indicates that the logical-volume LV0 is the snapshot-target volume and the logical-volume LV1 is the snapshot duplicate volume in a next step 3a01, the logical-volume property managing table 201, the logical-volume conversion table 202, and the held-data managing table 203 are initialized in a step 3a02.
That is, the snapshot-target property is given to the logical-volume LV0 and the snapshot-duplicate property to the logical-volume LV1 in the logical-volume property managing table 201. In the logical-volume conversion table 202, LV1 is set as a logical-volume number after conversion corresponding to the logical-volume LV0, LV0 is set as a logical-volume number after conversion corresponding to the logical-volume LV1, and a value 0 indicating that the snapshot duplicate volume holds no data is set in the snapshot duplicate volume (that is, the logical-volume LV in this case) in the held-data managing table 203. The state of each table at this time is shown in FIG. 3.
Next, described is a procedure of the processing performed at the time when the disk array subsystem 100 having the snapshot-target volume LV0 and the snapshot duplicate volume LV1 as described in the aforementioned procedure of volume duplicate receives the write-command and read-command.
First, described is the processing process at the time of receiving the write-command (505 in FIG. 8).
A microprocessor (simply referred to as CPU hereinafter) of the disk array subsystem 100 refers to the logical-volume property managing table 201 in a step 3b00 shown in FIG. 5 for judging whether the received command is a command for the snapshot-target volume or for the snapshot duplicate volume.
The processing is completed without writing data when it is judged to be the write-command to the snapshot duplicate command in a step 3b01. This is the processing of the case where it is used to maintain the duplicate of the snapshot-target volume in the state of the point where the snapshot command is received in the snapshot duplicate volume, e.g., the processing for backup and the like. In other use data may be written onto the snapshot duplicate volume as requested by the write-command.
In the meantime, when it is judged to be the write-command for the snapshot-target volume in a step 3b01, the CPU refers to the logical-volume conversion table 202 in a step 3b02 and specifies the snapshot duplicate volume as a pair of the snapshot-target volume. In a step 3b03, it is judged from the held-data managing table 203 whether there is data in the write-request address of the specified snapshot duplicate volume. When it is judged that the there is the data in the snapshot duplicate volume LV1, the data is written to the snapshot-target volume LV0 in a step 3b07 and the processing is completed. When it is judged that there is no data in the snapshot-target volume LV1, the data already stored in the write-request address of the snapshot-target volume LV0 is copied to the same address of the snapshot duplicate volume LV1 in a step 3b05. Then, a value 1 indicating that there is data in this area of the held-data managing table 203 is set in a step 3b06, and the data is written to the snapshot-target volume LV0 in a step 3b07. Thereby, the processing is completed.
Next, described is a procedure of the processing performed at the time of receiving the read-command (506 in FIG. 8). The CPU refers to the logical-volume property managing table 201 in a step 3c00 shown in FIG. 6 for judging whether the received command is a command for the snapshot-target volume LV0 or a command for the snapshot duplicate volume LV1.
When it is judged to be a command for the snapshot-target volume LV0 in a step 3c01, the data is read out from the snapshot-target volume LV0, and the processing is completed.
In the meantime, when it is judged to be a command for the snapshot duplicate volume LV1 in a step 3c01, reference is made to the held-data managing table 203 in a step 3c02, and it is judged in a step 3c03 whether or not there is data in a read-out require address of the snapshot duplicate volume LV1.
When it is judged that there is data in the snapshot duplicate volume LV1, the data is read out from the snapshot duplicate volume LV1 and the processing is completed. When it is judged that there is no data in the snapshot duplicate volume LV1, reference is made to the logical-volume conversion table 202 in a step 3c04 and recognizes the snapshot-target volume LV0 as a pair of the snapshot duplicate volume LV1. Then, the data is read out from the specified snapshot-target volume LV0 and the processing is completed.
A first drawback of the above-described conventional art is that the use efficiency of the storage capacity is bad.
The reason is that it is necessary in the data storing system of the snapshot duplicate volume in the conventional disk array subsystem to make a snapshot duplicate volume having at least the same storage capacity as that of the snapshot-target volume in spite that only the update data of the snapshot-target volume generated after receiving the snapshot command is copied to the snapshot duplicate volume.
That is, in the above-described conventional art, data-copy from the snapshot-target volume to the snapshot duplicate volume has to be performed by the same address so that, logically, the snapshot duplicate volume is limited to be in the same configuration as that of the snapshot-target volume.
A second drawback is that the data reading-out efficiency from the snapshot duplicate volume is bad.
The reason is that, in the data storing system of the snapshot duplicate volume in the conventional disk array subsystem, the data-copy from the snapshot-target volume to the snapshot duplicate volume is symmetrically performed in between the volumes having logically the same configuration with the same address being the parameter.
Accordingly, when the data-copy from the snapshot-target volume to the snapshot duplicate volume is generated in the scattered addresses, naturally, the data held in the snapshot duplicate volume becomes the scattered data. Thus, the effect of pre-fetching from a physical disk cannot be expected at all.
An object of the present invention is to provide a duplicate data storing system, a duplicate data storing method, and a duplicate data storing program for enabling to form a duplicate volume which consumes a storage capacity proportional to an update data amount of a snapshot-target volume after receiving a snapshot command in a storage device such as a disk array subsystem.